HCPRVR: An Interpreter for Logic Programs
نویسنده
چکیده
An overview of a logic program interpreter written in Lisp is presented. The interpreter is a Horn clause-based theorem prover augmented by Lisp functions attached to some predicate names. Its application to natural language processing is discussed. The theory of operation is explained, including the high level organization of the PROVE function and an efficient version of unification. The paper concludes with comments on the overall efficiency of the interpreter. An axiom is either an atomic formula, which can be referred to as a fact, or an expression of the form ( < .*. ) where both the conclusion and the premisses are atomic formulas. The symbol "<" is intended to be a left-pointing arrow. An atomic formula is an arbitrary Lisp ___-expression beginning with a Lisp atom. That atom is referred to as a relation or predicate name. Some of the other atoms in the expression may be designated as variables by a flag on their property lists. I INTRODUCTION III CALLING LOGIC PROGRAMS-HCPRVR, a Horn Clause theorem PRoVeR, is a Lisp program that-interprets a-simple logical formalism as a programming language. It has been used for over a year now at the University of Texas at Austin to write natural language processing systems. Like Kowalski [II, we find that programming in logic is an efficient way to write programs that are easy to comprehend. Although we now have an interpreter/compiler for the logic programming language Prolog [2], we continue to use HCPRVR because it allows us to remain in a Lisp environment where there is greater flexibility and a more familiar notation. This paper outlines how HCPRVR works to provide logic programming in a Lisp environment. The syntax of logic programs is given, followed by a description of how such programs are invoked. Then attachment of Lisp functions to predicates is explained. Our approach to processing natural language in logic programs is outlined briefly. The operation of HCPRVR is presented by giving details of the PROVE and MATCH functions. The paper closes with some remarks on efficiency.
منابع مشابه
The Intelligent Channel: A Scheme for Result Sharing in Logic Programs
The separation of logic and control In logic pro grams allows the programmer to write programs whose execution Is determined by the Interpreter. This charac teristic of logic programs spurred research towards diversifying the means for controlling the execution of logic programs, and towards understanding and explor ing the value of parallelism In logic programming. Much of these efforts bel...
متن کاملLogic Programs With Uncertainties: A Tool for Implementing Rule-Based Systems
One natural way to implement rule-based expert systems is via logic programs. The rules in such systems are usually definite clauses, or can easily be expressed as such, and the inference mechanbms used by such systems are built into the Prolog interpreter, or can be implemented in Prolog without much effort. The one component of expert systems which is not readily available in logic programs i...
متن کاملForum as a Logic Programming Language: Preliminary Report
When Miller introduced Forum he called it a speciication logic, rather than a logic programming language. In this paper we outline those features that create problems in attempting to implement an interpreter for the language, and describe solutions to those problems. We show how techniques used in the implementation of Lolli can be extended naturally to Forum. Finally, we show two Forum progra...
متن کاملOn the relationship between annotated logic programs and nonmonotonic formalisms
In the past, we developed a semantics for a restricted annotated logic language for inheritance reasoning. Here we generalize it to annotated Horn logic programs. We first provide a formal account of the language, describe its semantics, and provide an interpreter written in Prolog for it. We then investigate its relationship to Belnap’s 4-valued logic, Gelfond and Lifschitz’s semantics for log...
متن کاملLearning Teleoreactive Logic Programs from Problem Solving
In this paper, we focus on the problem of learning reactive skills for use by physical agents. We propose a new representation for such procedures, teleoreactive logic programs, along with an interpreter that utilizes them to achieve goals. After this, we describe a learning method that acquires these structures in a cumulative manner through problem solving. We report experiments in three doma...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1980